import request from '@/utils/request'

// 登陆请求

export function login(data) {
    return request({
        url: '/frame/login',
        method: 'post',
        data
    })
}

// 获取用户资料
export const getUserpostAPI = () => {
    return request({
        method: 'POST',
        url: '/frame/profile',
    })
}


// --用户管理模块请求---李春和-------------------------------------------
//#region

//获取用户列表
export const getUserListApi = (params) => {
    return request({
        url: "/users",
        params,
    })
}
//获取用户详情
export const getUserInfoApi = (id) => {
    return request({
        url: "/users/" + id,
    })
}
//添加用户
export const addUserApi = (data) => {
    return request({
        method: "post",
        url: "/users",
        data,
    })
}
//修改用户
export const updateUserApi = (data) => {
    return request({
        method: "put",
        url: "/users/" + data.id,
        data,
    })
}
//删除用户
export const delUserApi = (id) => {
    return request({
        method: "delete",
        url: "/users/" + id,

    })
}
//用户屏蔽开启
export const ignoreUserApi = (data) => {
    return request({
        method: "put",
        url: "/users/" + data.id + '/disabled',
        data
    })
}

//#endregion
// --/用户管理模块请求---李春和-------------------------------------------
